<div class="el-header">
	<div class="container" style="position: relative;">
		<ul class="nav navbar-nav navbar-right">
			<li><a href="/">首页</a></li> 
			<#if login??>
				<li><a class="el-current-user" href="/personal.do">${login.username}</a></li>
				<li><a href="/recharge.do">账户充值 </a></li>
				<li><a href="javascript:void(0);" id="logout">注销 </a></li> 
			<#else>
				<li><a href="/login.html">登录</a></li>
				<li><a href="/register.html">快速注册</a></li> 
			</#if>
			<li><a href="#">帮助</a></li>
		</ul>
	</div>
</div>

<script type="text/javascript">
	$("#logout").click(function() {
		$.ajax({
			dataType : "json",
			type : "post",
			url : "/logout.do",
			success : function(result) {
				if (result.success) {
					location.href = "/login.html";
				} else {
					$.messager.alert("提示", "网络错误");
				}
			},
			error : function() {
				$.messager.alert("提示", "网络错误");
			}
		});
	});
</script>
